#include <am.h>
#include <nemu.h>
#include <klib.h>
void __am_timer_init() {}

void __am_timer_uptime(AM_TIMER_UPTIME_T* uptime) {
  uptime->us = (uint64_t)inl(RTC_ADDR + 0x4) << 32 | inl(RTC_ADDR);
}

void __am_timer_rtc(AM_TIMER_RTC_T* rtc) {
  rtc->second = 0;
  rtc->minute = 0;
  rtc->hour = 0;
  rtc->day = 0;
  rtc->month = 0;
  rtc->year = 1900;
}